<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html style="overflow-x:hidden;overflow-y:auto;"><head>
<title>邯郸微购物</title>		
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">        
<!-- Mobile Devices Support @begin -->
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
<meta content="no-cache" http-equiv="pragma">
<meta content="0" http-equiv="expires">
<meta content="telephone=no, address=no" name="format-detection">
<meta name="apple-mobile-web-app-capable" content="yes"> <!-- apple devices fullscreen -->
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="stylesheet" type="text/css" href="${ctxStatic }/shopping/common.css" media="all">
<link rel="stylesheet" type="text/css" href="${ctxStatic }/shopping/xq.css">
<link rel="stylesheet" type="text/css" href="${ctxStatic }/shopping/home-menu-8.css" media="all">
<link rel="stylesheet" type="text/css" href="${ctxStatic }/shopping/font-awesome.css" media="all">
<style type="text/css">
.px {
	background-color: transparent;
	color: #999999;
	display: block;
	width: 85%; 
	padding:10px;
	font-size: 16px;
	font-family:Arial, Helvetica, sans-serif;
	border:0;
	-webkit-appearance:none;
	border:1px solid #e7e7e7;
	-webkit-box-shadow: 0 0 3px 0 #eeeeee inset;
	-moz-box-shadow: 0 0 3px 0 #eeeeee inset;
	box-shadow: 0 0 3px 0 #eeeeee inset;
	border-radius: 3px;
}
</style>
<script src="${ctxStatic}/jquery/jquery-1.9.1.min.js" type="text/javascript"></script>
<script type="text/javascript">

function update(){
	var unitprice=parseInt($("#unitprice").html());
	var count=parseInt($("#count").val());
	$("#total").html(count*unitprice);
	$("#real").html(count*unitprice);
}


function add(maxCount){
	
	var count=parseInt($("#count").val());
	if(count<parseInt(maxCount)){
		$("#count").val(count+1);
	}else{
		$("#count").val(maxCount);
	}
	update();
}

function subtract(){
	var count=parseInt($("#count").val());
	if(count>1){
		$("#count").val(count-1);
	}else{
		$("#count").val(1);
	}
	update();
}

function checkCount(maxCount){
	var count=parseInt($("#count").val());
	var r =  /^[1-9]\d*$/;
	if(count<=0){
		$("#count").val(1);
	}
	if(count>parseInt(maxCount)){
		$("#count").val(maxCount);
	}
	if(!r.test($("#count").val())){
		$("#count").val(1);
	}
	
	update();
}
</script>
</head>
<body>
<div class="body">
<header class="w-header" mon="type=header">
  <a class="arrow-wrap" href="javascript:history.back()" mon="content=back">
   <span class="arrow-left"></span>
  </a>
  <a href="index.html?uid=${uid }&wechatId=${wechatId}" class="home" mon="content=home"></a>
  <div class="text">订单详情</div>
</header>


<section class="order-info">
<ul>
    <input name="dealType" value="1" type="hidden">
    <input name="dealTinyUrl" value="swdbwplc" type="hidden">
    <input name="dealPrice" value="40000" type="hidden">
    <li class="order-title">
      <div class="short-title">${goodsOrder.product.name }</div>
    </li>
    <li class="order-common-item">
      <dt>数量</dt>
      <dd><span id="unitprice"> ${goodsOrder.productNumber }</span></dd>
    </li>
    <li class="order-common-item">
      <dt>总价</dt>
      <dd>¥<span id="total" class="j-amount-price">${goodsOrder.price/100 }</span></dd>
    </li>
    <c:if test="${not empty score }">
    	<li class="order-common-item">
	      <dt>积分</dt>
	      <dd><span id="total" class="j-amount-price">${score }分</span></dd>
	    </li>
    </c:if>
    <li class="order-common-item">
      <dt>实付款</dt>
      <dd class="common-color-pink">￥<span id="real"  class="j-total-price">${goodsOrder.price/100 }</span></dd>
    </li>
   <li class="order-common-title free-login">
     <dt>收货地址</dt> 
    </li>
    <li class="order-consume-tip" style="height:auto;line-height:25px;">
     <span style="color:#000000;font-size:19px;">${goodsOrder.address.name }&nbsp;${goodsOrder.address.mobile }</span><br/>
    <span style="color:#D0D0D0;">${goodsOrder.address.province }&nbsp;${goodsOrder.address.city }&nbsp;${goodsOrder.address.county }&nbsp;${fn:substring(goodsOrder.address.detail,0,9) }</span> 
    </li>
    <li class="order-common-title free-login">
     <dt>配送备注</dt> 
    </li>
    <li class="order-consume-tip" style="height:58px;line-height:25px;padding-top:10px;">
		    ${goodsOrder.remarks }
    </li>
    
    <li class="order-button">
      <input class="order-common-button btn-submit j-order-submit" value="支付" type="button"   onclick="javascript:window.location.href='${ctxFront }/servlet/Trade?orderId=${goodsOrder.id }&gidcode=${encodeId }'">
    </li>
    
</ul>
</section>





</div>
</body>
</html>
